package com.bluesea.utils;

import org.apache.commons.lang.RandomStringUtils;

public class StringUtils {

	private final static String NUMBERS_ARRAY = "0123456789";

	private final static String LETTER_ARRAY = "abcdefghijklmnopqrstuvwxyz0123456789";

	public static String getRandomChars(int count, String chars) {
		return RandomStringUtils.random(count, chars);
	}

	public static String getRandomNumbers(int count) {
		return getRandomChars(count, NUMBERS_ARRAY);
	}

	public static String getRandomStrings(int count) {
		return getRandomChars(count, LETTER_ARRAY);
	}

	public static boolean isNullOrEmptyOrSpace(String string) {
		return ((string == null) || ("".equals(string.trim())));
	}

	public static boolean isNullOrEmpty(String string) {
		return ((string == null) || ("".equals(string)));
	}

}
